Fix bug in spower
typo
Prettify code