Fix for problem when changing the number of ports of the if actor