fix bugs in l_L, improve error reporting and recovery.