fix basedir var in control script