Bug fix with port number, and state handling