Added better support for arrays.