Fixed some errors and made the example work again