Fix some things to make it mostly working