Switching pattern in a common function.
Merge commit '086870223c49776c0166affd2b1de9247e07ac45'