fix call to protected method and killed dead code