Fixed print line when there is no last_id