Adding integer cast of port when assigning to class scope variable

fixes issue #6