Fix bug with writing ID_type of second operand in where method.