fixes view permissions + tests