fixed usage with models with custom primary key