Fix for primary_key