fix bugs for redhat5