Fixes the dat.gui value refreshing logic.