Fixed bug which stopped checking if ports were up