removed dead code, fixed compiler warning