We consider positive solutions of $Delta u-mu u+Ku^{frac{n+2}{n-2}}=0$ on $B_1$ ($nge 5$) where $mu $ and $K>0$ are smooth functions on $B_1$. If $K$ is very sub-harmonic at each critical point of $K$ in $B_{2/3}$ and the maximum of $u$ in $bar B_{1/3}$ is comparable to its maximum over $bar B_1$, then all positive solutions are uniformly bounded on $bar B_{1/3}$. As an application, a priori estimate for solutions of equations defined on $mathbb S^n$ is derived.