fixed ScriptDb sorting and timeout connection