fix problem when table can be expanded multiple times causing height to increase exponentially