Better direction filter

Signed-off-by: Valérian Saliou <valerian@valeriansaliou.name>