fixed bug #2, sp. mistakes; caught exceptions
fixed bug #2, sp. mistakes; caught exceptions