fix sortpower bug