Fixed some cherry-pick remnants from previous commit