moved initServerAddress to different position, so it only triggers once