bug fix and prepare for SDK light