Fixed mongo config access and trailing ws.