Fix script timing

This pull request addresses all issues found in #58