Fixed filterRegion, edges will produce errors though