fix small bug with permissions