More robust pending detection