fix mongodb access problems.