Fixing fruitless type match