Fixed mongo update bug