Fixed a bug in calculating standard image size.