Fixed bugs on redhat