Fixes #6013, #6014 - changes for RHEL7