fix a db scripts