BUGFIX

ENCODING + FRAGMENT LOGIC + other stuff (minior)