improve vm, solve some mem-leak problems