Not sure why this isn't already part of master...