Fix broken collation callback function to generate strings correctly.