Some fixes for redhat and centos compatibility