Fixing the code for port