fixing dynamically resizing tip container

In the dynamically resizing code that was merged in recently, we broke the functionality of the code by changing the order in response to code review comments.  I added a comment about the need for the operations to happen in the specific order, and reinserted the origin code.