Fix crash when using admin credentials