Fixes #4857
This was a hack actually