PortalKit: fix bug that report failure incorrect