fixed bug in exception handling