Minor issue fix in listCommits method