Fixes NPE when filling a bucket.