Fixing bug in L format