fixed dofile, closes #24