Added handler for end transmission