Bug: wrong regexp for empty text