second part of fixes