fix JSR and BSR bugs. untested.
fix bugs in JSR. adjust debug output.