Add multi-architecture support & fix some address matching bugs