a few fixes and cosmetics