Script log bug fix