fixed UnboundLocalError when receiving 0 port beacon
commented debug statements