Fixed a bug that using incorrect database settings