Fix bug with attaching tokens