various fixes from secound live debugging