fix for image height calculation error