Fixed bugs in CommitService class.