Improved reflection error handling