latest tweaks and bug fixes