Fix width/height calculations and corner handling