quick fix for #6498

fixes #6498 in theory