materialized views fixes