fix exception count bug