a few extra fixes from koalie