fixing some id/pk issues