Fixed a bug in LPU.py.