Bugfixes for array handling.