Fixed ForeignKey Bug