Xtal code update in MAIN, should work now