fix crash if no commits