[backport] Backport #358, #360