Fixed problem with image size estimation