Autofocus problem with globular clusters

I really having a hard time when focusing on globular clusters. The problem is caused by the following: when starting the autofocus routine with a globular cluster inside the crop box of the autofocus images, SGP doesn’t use the core of the cluster because it’s way out of focus and just a blob. When nearing the focus point SGP doen’t only use the outer stars for focus, but also sees the core of the cluster as a star with a HFR with an extremely high value, throwing of the focus graph.

I imagine that the focus routine consists of adding all of the HFR values and dividing them by the number of stars, which gives the average HFR value used in the autofocus graph. If the routine would not take the average of al the HFR values but the median value it would give a better result because the lowest and highest value (or maybe even 2 values) are left out of the calculation. This takes the HFR value of the core out of the equation.