code compiles and fix TextDetectorTest