Warning fixes

Some warnings were triggered during -Wall and -Wextra