Fixed encoding bug when setting the access tag.