Fixed wrong array pointer usage