various hacks to just get it working. Works now, time for other stuff.