fixing bug, which allows to loose data for some conditions
ver++
Merge pull request #1 from octo47/master

合并代码