Added checks to make sure values changed through code aren't overridden by yaml refreshes.