Merged some fixes of upstream