MongoDB error fixed with PUT request.