Fixed foreigin key exporting problem