fixing compilation error and commenting unused code