Fixed Foreign key constraint error.