Fix StateHistory permissions (#319)