fix bugs brought by customized db active records