fixed error when no ports specified