add some debug messages and a temp hack
significantly less hacky fix for missing includes