fixes to bring code up to latest changes