fixes for cran (T -> TRUE etc.)