Some const-correctness fixes
Fix = vs == bugs