WORKS! fix issue causing bug3.js to fail; update doctests (but not completely)