Bugfixes and dimmer support