AMI-396 typo, and make more portable