fix var type error in gcc4.8.2