Remove trailing whitespaces in core.