Fix for unworking check for bad unicode entities.