Fixed bugs with array keys added