fix bug with 0 pile_height