Fix error handling with new data