fixed compile error in gcc