fix another bug in altitude graph logic