fixes reported in #3621 #3617 #3616 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>