Fixed LWM initialization