fixed bug: in abmaglim calculation