fix with local lms variable