Fix dependencies so everything compiles with M2