fixed typo
some minor try catch change