Fixed lua interface giving random stack error