Fixing bugs on script interface