fixed wrong table name in sql query