Fix bug that it only use ID pattern