Fixed executing of sql scripts