Fix undefined index id.