more fixes and polish