fix bug on collection.update