Fixed issue when fewer than 3 commits