Fix up issues with dependencies; may still be some issues with the chain