Fix several warnings