more debug output
fixed a bug