Simplify errors for better browser compatibility