fix lua bug