Fix upload port problem, see issue #103 & #195.