fixed crash on port in use