changed order of switch cases in EM engine source file