fix a bunch of stuff related to _filename