fix some const issues and some bad merges (no cookie)