Fix some minor bugs and get some tests using dynamic ports