Added table name to conditions, based on #54 by aflatter
closes #54