Fix calculations for background image size