Fixing a divide-by-zero bug where a ramp height is 0