Correct LWM Code