various fixes. NOW everything seem to work properly