Merge changes I4752bdf1,I37690cf2

* changes:
  Move Surface operations into existing transaction.
  Clear orientation variable until rotation is done.