Fix LMS crash