some minor fixes and a broken test