Fixed mongodb issues.