finishing cherry-pick

Signed-off-by: Zarboz <zarboz@gmail.com>