Fixed the port bug slightly more elegantly.