Changed order of operations

Changed order of operations