fix array keys bug