Fixed text cropping errors by double casting