More error handling changes