Bug with exception type fixed, performance fixed