Simplify code when mlocked is true