more const-correctnes
fix gcc warnings