bunch of fixes waiting (will be rebased before merge )