fixed single " in condition

Having a non-valid string (missing 2nd quote) in a condition caused the program to stuck in a loop