Another PR for #816

Fixed conflicts from here: https://github.com/mybb/mybb/pull/817