fix 

various fixes (see commits)