Additional fixes suggested in patch review