Fix port unreservation and a deadlock with local install