BADASS changes to make mongoDB work properly