fixed bug in catch error