[#516] Fixes incorrect use of hasText