Fix for permissions loop overwriting the base class and causing any iterations after the first to fail