Fixed an encoding bug when setting the access tag.