some mistakes

With good tests by Zavadsky Artem, we find some bags, and we fix this
bags)