Cherry-pick latest patches from roxy