fix db_security bug, make code more clearly