Make the inspector toggle work reliably