bugfix: set overflow flag wrongly when log space is empty.