fix for command line tool with polymorphic table