Are you sure you meant `height` here and not `width`? Seems like you're subtracting components of different axes.