JS match group fix