Final

Fixed a possible bug on a random movement, where the random generator
might not generate a number required.