fix several warnings