update for arm64 and fix a bug