fix DB calls