Fix logic bug because of which with memory problems
Fix logic bug because of which with memory problems

ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core,ONLYOFFICE/core