Bug in renderScriptBatch

ksort returns bool value. So all scripts will be groped always in to one.