Modify code of create port