Fix all functionality for tabs