fix error boundary check