Fixed compiling on debian and proofed order reading

This fixes issues #7 and #8