active tabs working correctly