Fix bug with onRenderCollection call