Fixed bugs, I think