Add patch from Paul Wise to filter out various unwanted stuff