fixes dimmer toggle functionality