Fixed bug with dimensions, proper support for some orientations added.