fixed port var bug and server var bug