fix first-time case where script output is empty