fixing a bug with changing array to object
1.0.1