automatically remove trailing spaces on startup