updateheights corrected bug