fixing db scripts