Removing space from string in controller