bugfixing touch event blocks and usercode generation