merge cpu1 crash fix. Credit to tdm