Simulating X-Ray Photoelectron Spectra or calculating Aluminium K (1s) binding energy

Hi,
Do anyone know how to compute Aluminium K (1s) binding energy using CASTEP? From the CASTEP manual it seems one can compute the core hole spectroscopy. However, following the approach (given in the tutorial for computing EELS spectra of Boron Nitride) when I compare the energies of the N electron and N-1 electron (system with a core hole) its obvious that I am doing something wrong. I am using on-the-fly-pseudopotential and supercell for the system with core-hole as prescribed.

Any help will be appreciated.
Best,
Indranil