Fixed most bugs

I think