fixed an bug in bitmask of movement