Fixed bug in catching collection if selectedCollection stored variable is missing