bug: wrong table name in sql