Fix Collection writing test