Fix error handler on client connection