Port already used problem with autodetect

this is exactly the same problem as here: