cleaning up mongo errors