changed some more sql scripts