quick error handling improvement