Hopefully it works this time, and I fixed the debug output.