Fixed some outstanding bugs in addin and gui scripts.