Fixed bug at deleting ForeignKey related objects