Fix code when try to get portal object

Fix how to get the portal object because state_change does not exists