fix bug in power script