Minor tweaks to support dart M4