Replacing spaces succesfully