fix bugs of exception