fixed compile error in lua-5.2 or above
fixed multiple VM issue when running the test