Small fixes (PR 545)

Rebased PR https://github.com/elkarte/Elkarte/pull/545, to remove an already fixed issue and a merge, and squashed a couple of commits.