Remove unnecessary spaces in refrence