Fixed issue with arrays