Fixed mongo issue with 'safe' deprecated