Fixed actor api functions (haven't tested save when document already exists)