Fixed retrieving of commit index from vcs

Change-Id: Ic917f8f2bf734d7cb4a68eba325c686cbf7877d5