Fixed wrong array key reference