minor and various fixes