bugfix, and add testall.lua