fixed UPS detection