Some fixes related to Recent thanks to @emanuele

fixes #1508
fixes #1496

Signed-off-by: Antes <antes@simplemachines.org>