Lrm fixes

Fixed issues with LRM. 
1. added break statements
2. correct dictionary set being unsafe