some fixes for script interface