octave compatibility fixes