Fix word db relationships