Fix 'perpetual reloading' bug