Somefixes

Some fixes some Cherry Picks  from SMF2.1 or perhaps [Wedge?](https://github.com/SimpleMachines/SMF2.1/commit/aec98628cbc78d30a38f2dcf68dfc747740a899f?) Hummmm