Added NMI handling code to startup