Fixed a bug with previous cherry-pick