fixed empty commit detection