fixed a bug to detect wrong pattern in reminder