several tweaks e bugfixes