fixing heap logic