Fix permission bugs!