Improve compatibility with scripting environment