Eating the molt is probably not going to do it any harm. It may just be still getting used to your water parameters. expansion and contraction is common as it tries to regulate its internal fluids with the tanks. This is not good. If it is doing this constantly then your water has an issue. Otherwise if your water is good. ie; low to zero nitrate etc. then its a good chance its just taking a poop

or periodicly flushing itself. Give it a day or so.. if you happen to glimps the mouth, if it is wide open you have a problem, if its puckered up.. your good to go.