fix remote scripting. closes gh-512