Fixed bug where index generator was drawing images with incorrect aspect ratio