bug fixes and prelim dimming at late hours