trying to fix permission bugs