fixed several warnings