AI-657: fixed freezing problem