added a frame sync to function ScaleBody