Corrected order of operations