Fix width and heigth rounding logic