fixes to various issues