updating tests and fixing global port issue