Fix for #603

Committing fix from Arantor in http://www.simplemachines.org/community/index.php?topic=510848.0