A little dirty but this works.