Fixed effect rendering, added safer code for gui