fixes and refinements