Trim whitespaces from options text and fix #3674