adding some more debug, fixing some stuff