fix pending bug