Fixed goes_to_gw and is_from_gw so that they accept negative
gateway types ( to match all gw types)