Fixed a small bug where collection id got set to 0 instead of nil