Copying some changes from sportdb fork.