Fixed several warnings