Some small bug fixes thanks to ARG and illori

Signed-off-by: Bryan Deakin <runic@simplemachines.org>
Merge pull request #543 from smfrunic/release-2.1

Some small bug fixes thanks to ARG and @illori