fixed db scripts