fix open file bug