small fix for duckpan, added check for port in proper location removed incorrect check