Make port change in good thread