fix all but three warnings