Updates to handle empty scripts