Added some whacky hacks to make it work.