fixed the ValidationError in case of using session interface of Mongo… …  …Engine