fixed a bug in function ini2array