fixed local variable stuff

variable inheritance is very literal in Lua