Bugfixes for Main.lsl