Fix a deadlock issue.
Fix illegal instruction issues on cpus without avx.