fixed Lua error memory leak; changed math.ellipse base to top