Fix mongoengine connection.