Fixes for scripting interface