fix #729 initialization when loading an existing script