Fix most obvious mistakes