Fixed createlocals issue