Fix bug with objects with spaces in the name