Thumb hook issue

Hi kirby lovers,

I have a strange issue regarding the thumb function inside a hook.
When I upload an single file it works great, but when I upload multiple
files, the url to the thumb gets wrong, and it reverts the already uploaded thumb files
to “7575" instead of "100100”. The field “filer” is the “builder field” by https://github.com/TimOetting/kirby-builder

kirby()->hook('panel.file.upload', function($file) {

        $page = $file->page();

        if ($page->intendedTemplate() === 'page') {

            $filer = $page->filer();
            $img = thumb($file, array('width' => 100, 'height' => 100))->url();

            if ($filer) {

                $files = $filer->yaml();

                $files[] = [
                    'name' => (string)$file->name(),
                    'uri' => (string)$file->uri(),
                    'url' => (string)$file->url(),
                    'ext' => (string)$file->extension(),
                    'thumber' => $img,
                    '_fieldset' => 'filer'
                ];

                $page->update([ 'filer' => yaml::encode($files) ]);
            }
        }
    });

Output in content file:

Filer: 

- 
  name: "21"
  uri: projects/apple/21.jpg
  url: >
    http://localhost/kirby/content/projects/apple/21.jpg
  ext: jpg
  thumber: >
    http://localhost/kirby/thumbs/projects/apple/21-100x66.jpg
  active: ""
  _fieldset: filer
- 
  name: "5"
  uri: projects/apple/5.jpg
  url: >
    http://localhost/kirby/content/projects/apple/5.jpg
  ext: jpg
  thumber: >
    http://localhost/kirby/thumbs/projects/apple/5-100x67.jpg
  active: ""
  _fieldset: filer
- 
  name: "1"
  uri: projects/apple/1.jpg
  url: >
    http://localhost/kirby/content/projects/apple/1.jpg
  ext: jpg
  thumber: >
    http://localhost/kirby/thumbs/projects/apple/1-100x67.jpg
  active: ""
  _fieldset: filer

----