Fix functions that return string in Commit class