Fixed some weird unboxing error resulting in a cast error when trying to
get the port.