fix config permissions check order