Fixes to liblight

From Shendu

Change-Id: Ia7fe45938ef4b84e948295bd81ce03b3c4e89ca1