Merge pull request #413 from rattoma/master

bug fix mode_chek