Fixed bug where table name was hardcoded (cut and paste error).