fixes open file bug