Fix bug on collection change