better fix for trailing spaces issue
merge