Fixed try..catch block