Fixes fileState bug