Fix bug that is to happen NullPointerException, when run
getConnectedPort