Remove trailing garbage