bug fixes in @compat; make debugging easier by adding a capture_stderr const flag, make some changes for #238 (not fixed yet)