if it is set for cool there should be no way for the heating system to come on unless the thermostat is faulty!!
is it a programmable digital type T'stat? would suggest you consider replacing the T'stat, better to let a HVAC person check it out and change the thermostat if its at fault. good luck LJ