fixed displaying edit button before file opened