fixed issue with lit state not being updated