bugfixes after adding 'array' support