Fixes bunch of things.