fix some bugs

this makes it work again