Updating clearSide function to check if we need to remove inactive label