Fixed bug in keys, where the tblname was wrong.