fixed lot of critical problems