Greg may be right but do not overlook Josh’s suggestion. When electrics act unpredictable always suspect a bad ground.