fixes permission issues