Some fixes to offscreen and added flows. And some fixes to luasocket.