quite some fixes for 2.5.x, changed debug messages for simplier
debugging