fix exception bug