fixed an erroneous str-replace introduced error, and swapped the order of contains parameters.