minor fixes and simprovements