Articulated opposing grippers with rack and pinion joints not acting correctly

Hi thanks for all the help so far. I have two rack and pinion joints that are attached correctly and are actuated by a Revolute Joint. Everything works fine by itself but once when I grip objects the grippers can slide up and down the linear rails(Prismatic Joints) together with the object in their grasp. I want the object to always be centered when grasped. Pic below to give an idea of the system Thanks. On an added note they get into a state of being broken when they are actuated too fast and get stuck closed.