Please do not glue them, that would eliminate cleaning and service of the pumps in the future and that must be done to keep them running. How old are they? It can be the tabs on the front cover are worn, in that case a new front cover will solve it. It may also be the cover is simply out of round and can be warmed up in hot water and reshaped, I would find something round of about the same size like a PVC coupling to compare to. In some cases the motor is the issue, the engagement tabs are worn or broken or the motor frame is cracked, in that case I would uses silicon or zip ties or replace the motor, but you want to make sure it can be undone and opened for service.