fixed strip_text method