Minor changes for exception handling