Fix mixing error with accurancy
octave compatibility fixes
small changes
Merge fix for octave