Fix Bags

Fix bag with encoding
Improve eng and rus algorithm