various fixes
fixed merge conflicts