Backport #913

Backport #913 
Fix #1215 and other complaints …

@john7000

@DeepDiver1975 @karlitschek