script and timeout fixes