various bug fixes. more qa tests.