fix db var bug