bugfixes on zhang and feng scripts
more zhang and feng bugfixes