Add a tests to ensure renderCollection calls
Fix bug with onRenderCollection call