Many fixes for tabs lifecycle