treat odd image size resize problem