fixed all the warnings from gcc4.7