Correct implementation of match_prefix es