some basic test coverage and some fixes found from those tests