Several bugs - changes for RHEL7 and RHEL6