fix outstanding issues & tests