Minor fix. L should be outside of conditional check