Add one more null check to permissions manager.
Remove unused class