Remove dead code

- Fixed #1557