Fixing scripting issues

see #46