Bugfix for empty arrays