add support for multiple vt-am, fix some bugs in the binary