Improve error unwrapping