Proper encoding of engine id to avoid format decode errors