fix reference height calculation :)