Fix hasText method