fixes parsing script options