Fix: Corrected permission bug and limit breaking depth.