fixed exception bug