fixed throw exception bug