Fixed some compiling-time errors (fedora 17 platform with gcc 4.8.2)