Fixes #6985

Second attempt, it should be fine now.