improve custom scripting support