keyword detection now properly handles final dot