Fix for empty collections and not initialized collections + version upgrade