God only knows how horrible this is. But it works for now.