3.8: bunch of fixes from the community

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>