Backport of pull request 156

Backport of the past answer / gateway quiz fix.