Bugfix in array_clear