fixed issue with serving non-text files incorrectly