various fixes after lsmith77 review