Fixed ifs.
Skipping empty commands.
Fixed FK creation.