fixes

some improvements and fixes