Hopf Bifurcation in a model with endogenous carrying capacities