db query exception fix