Fix encoding of pattern
Fix failing test of rbx