Fix check for pending status