improve coscript support