Changed exception handling slightly