use correct dimensions properties
Patch to fix calculation of aspect ratio and right/bottom coords