fixing order of operations

Signed-off-by: Kyle Rockman <kyle.rockman@mac.com>