Added some bugfixes to the Affilinet part