Fixed issue with ForeignKey template