Lockbutton state saved in preferences