small fix Prolog movement function