AttributeError exception when no primary receiver fix