multiple fixes; seems to work