Fix npe for empty scripts