Fixed warning and removed dead code