fix compare type