Fix FK in tasks