fix bug for lua4 to lua5