Octave compatibility fixes