Small fixes

Read commit messages for detailed info.
fixes #2508 
Signed-off-by: Antes <antes@simplemachines.org>