Fix error callback when port is already in use