Fixed mongo connect code.