better error handling for data reset