Possible better way for knowing if we're in a transaction