fix taxonomy related sql error