fix token comparison