Improve performance of catchAll.