fix gcc 4.7 errors