Bugfix typos

Replaced unused variable and made echo work again.