Eliminate compiler warnings
fixed mingsong's review