Fixed a bug in parsing commits without a parent