Changes for handling exceptions