Fix Issue #13 using exception handling.