Added Dos header, bug fixed