fix formatting operation ordering