changed the materializer to only apply the latest operation and fixed dialyzer warning