stacks don't disappear immediately, so we need to check both pm cases