Very Dirty but works.