Fixed detection of things to commit