Fix exception in mongodb storage