Fixing some dependency loops