several bugfix