Fixed serious bug in Python code for conditional LM