fix references to wrong next file