Fix various warnings in ava2