fix bug when commit field was empty