Bug where all queries were doubled fixed. Octave/Matlab invocation bug
in error raising fixed.