various fixes - still debugging