fix order of DDL statements