fix a bug thrown by gcc