merge azai's fixes