Changed exception handling