fixed bug on 32bit int