Removing extra space in generation message