Fixes

and improvements.