TextBox empty text crash fix