fixed issues #80

doesn't work when editing file in sub directory