Fixed a bug in Array rotation

Signed-off-by: Martin Evans <martindevans@gmail.com>