error fixes

http://www.simplemachines.org/community/index.php?topic=391961.msg3638651#msg3638651