Fix to merge of 'Reworking handling priviliges' commit