Some optimizations for LR