Fixed compilier error and warning with gcc 4.7.