loca table fixes and added RLE encoding

else will be executed when for loops completes without any break or exception.