fixed bug when loading settings