Fix errors in script editor in build phase editor.
Fix #366