Fixed issues noticed by gcc