more fixes and warnings