Fixed the problem. Resize now resets count to 0 to anticipate for readding all elements.