fix a compiler bug for gcc 4.8