fix small bug for heap file