fix unreferenced variable warnings