fix powers order of operation