Added code to handle the CLUSTER_PORT variable