a few fixes to pass tests