fixed the powerFunction bug