Fixes!

Also noticed a bug that isn't fixed on this commit.