fix permission callbacks