Function to rejoin line after action