Fixed typo, querying wrong table