Fix bug with image resolution.