fixed a bug of varying aspect ratio