attempt to fix constness bug