tt.wasEmpty isn't set after parsing and thus can't be used here. Is it meant to be this way?