Added close goal
Check for pending commits in close goal