bug fix account sql