Fixes #6097 by adding a necessary argument