Fix half-pixels in calculated values