Fixes with dependency analysis