fixed for new ctrulib #untested