misc fixes; now all tests pass in FF