multiple tweaks and fixes