Fixed issue with adding custom regex elements