typo correction lenght into length and modify json manipulation on daemon server