Fix for #1058; Fixes #1030; Fixes #1014