fix bug. make things work on non-default ports