syntax fixes for mongoose