fixing a bug with combined scripts