hopefully bugfixes to scripts