Fixed bug in entity selection in OpenGL. Fixed memory leak in Lua main window.