correct issue where collection is nil