Remove & insert again the CMOS battery, this will erase firmware memory. If nothing will change, flash a new Envy firmware. There is almost zero probability, that incorrect program is sitting there right now if the computer is working. But indeed, this is a weird situation.