various changes/fixes