bug fixes and small tweaks

nothing deserving notice