Fixes activities encoding