Bugfixes from testing.

--BRJ