fixed bug with keys of array