Fix crash when reloading config