Fix for mongoose