Switched to protocol implementation of the "port"

 - corrected return code from a failed check