resolved wrong db statement