bug fix, get_height_balanced, check balance and calculate the height at the same time