Applied Amandroid option patch from Fengguo Wei.