Fixed bug when mongodb was not present