fix for #7203 and #6280

Last minute fix for issues on Linux