Fixed tablenametypos from foreign keys.