Fixing open file issues.