Merge "Fix infinite boot-loop bug in SM." into klp-dev