fixes more bugs

I should probably stop working on this as it seems to be
counterproductive today…