fixed a bug involving permissions