Hackish as fuck, but somehow this works!!!