fixed compile bug for gcc