Fix issue with checkout on commit

Change-Id: I16936ea38bb7449c517429349952802cdbfeb669