fixed wrong text() call to possible non-exception variable