Fix issues with mongo query and some conf changes