fixed some error based on centos 4 with gcc 3.4.6