Merge pull request #656 from foxinushka/master

Fixed IDLE operation interruption
Fixed potential crash (fixed #658)
Improved IDLE interruption (#656)