fixing incorrect array key