fixing the power spectrum derivatives