fix collection undefined var