to_mongo now correctly works