Fixed foreign key output and spacing