possible bug in CollectionManager.length since items could be set to undefined at runtime