fixing several warnings