Corrected bug when deleting a collection (the selectedCollection was left the same as the deleted one)