Added support for block rotation.