[IDE-2] prevent double encoding + minor bug fixes