minor fixes and a new test