fixed bug with reference to old file