fix a bug in relational data gen