added fix for Tables with primary key other than int