Array to string conversion correction