fixed bug #2, spelling mistakes; caught exceptions